package com.xxgc.demo.controller.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @Author: SJY
 * @Date :2023/9/11 - 09 - 11 - 8:51
 * 用户实名认证
 */
@Schema(name = "实名认证VO对象",description = "实名认证VO对象")
@Data
public class NameAuthenticationVO {

    @NotNull(message = "id不能为空")
    @Schema(description = "用户id")
    private Long userId;

    @Size(min = 2,max = 50, message = "姓名长度在2-50位之间")
    @Pattern(regexp = "[\u4e00-\u9fa5]+", message = "姓名只能出现中文")
    @Schema(description = "姓名")
    private String name;

    @Pattern(regexp = "^\\d{17}[\\dX]$", message = "身份证号格式不正确，且必须是18位")
    @Schema(description = "身份证号")
    private String idCard;
}
